import AdminLayout from '@/views/admin/layout/AdminLayout.vue'

export const adminRoutes = {
  path: '/admin',
  component: AdminLayout,
  meta: { 
    requireAuth: true,
    roles: ['admin']  // 只允许管理员访问
  },
  children: [
    {
      path: '',
      redirect: '/admin/dashboard'
    },
    {
      path: 'dashboard',
      name: 'AdminDashboard',
      component: () => import('@/views/admin/dashboard/index.vue'),
      meta: { title: '首页' }
    },
    {
      path: 'users',
      name: 'UserManagement',
      component: () => import('@/views/admin/user/index.vue'),
      meta: { title: '用户管理' }
    },
    {
      path: 'pets',
      name: 'PetManagement',
      component: () => import('@/views/admin/pet/index.vue'),
      meta: { title: '宠物管理' }
    },
    {
      path: 'products',
      name: 'ProductManagement',
      component: () => import('@/views/admin/product/index.vue'),
      meta: { title: '商品管理' }
    },
    {
      path: 'orders',
      name: 'OrderManagement',
      component: () => import('@/views/admin/order/index.vue'),
      meta: { title: '订单管理' }
    },
    {
      path: 'services',
      name: 'ServiceManagement',
      component: () => import('@/views/admin/service/index.vue'),
      meta: { title: '服务管理' }
    },
    {
      path: 'appointments',
      name: 'AppointmentManagement',
      component: () => import('@/views/admin/appointment/index.vue'),
      meta: { title: '预约管理' }
    },
    {
      path: 'profile',
      name: 'AdminProfile',
      component: () => import('@/views/admin/profile/index.vue'),
      meta: { title: '个人信息' }
    }
  ]
} 